<!DOCTYPE html>
<html>
<head>
  <title>Test document hierarchy</title>
  <link rel="stylesheet" type="text/css"
        href="chrome://mochikit/content/tests/SimpleTest/test.css" />

  <script type="application/javascript"
          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>

  <script type="application/javascript"
          src="../common.js"></script>
  <script type="application/javascript"
          src="../role.js"></script>
  <script type="application/javascript"
          src="../states.js"></script>

  <script type="application/javascript">
  function doTest()
  {
    var tree =
     { SECTION: [
       { SECTION: [ // div
         { LABEL: [ ] } // link
       ] },
       { SECTION: [ // div table-cell referred by label
         { TEXT_LEAF: [ ] }, // 'Z'
         { TEXT_LEAF: [ ] } // ' '
       ] }
     ] };
    testAccessibleTree("container", tree);

    SimpleTest.finish();
  }

  SimpleTest.waitForExplicitFinish();
  addA11yLoadEvent(doTest);
  </script>
</head>

<body>
  <a target="_blank"
     href="https://bugzilla.mozilla.org/show_bug.cgi?id=673757"
     title="Do not process invalidation list while tree is created">
    Mozilla Bug 673757
  </a>
  <p id="display"></p>
  <div id="content" style="display: none"></div>
  <pre id="test">
  </pre>

  <div id="container">
    <div><label for="x"></label></div>
    <div style="display: table-cell;" id="x">Z<span style='white-space:pre'> </span><span></span></div>
  </div>
</body>
</html>
